package  gearunits.models{
	import org.papervision3d.core.math.NumberUV;
	import org.papervision3d.core.math.Number3D;
	import org.papervision3d.core.geom.renderables.Triangle3D;
	import org.papervision3d.core.geom.renderables.Vertex3D;
	import org.papervision3d.core.geom.TriangleMesh3D;
	import org.papervision3d.core.proto.MaterialObject3D;

	public class PMeshBuildingBarrack extends TriangleMesh3D {
		private var ve:Array;
		private var fa:Array;

		public function PMeshBuildingBarrack(material : MaterialObject3D ) {
			super( material, new Array(), new Array() );
			ve = this.geometry.vertices;
			fa = this.geometry.faces;
			v(15.900001,0.040000,1.900001);
			v(15.900001,0.040000,-1.900001);
			v(-15.900002,0.040000,-1.899997);
			v(-15.899994,0.040000,1.900006);
			v(15.900007,12.760000,1.899993);
			v(15.899991,12.760000,-1.900010);
			v(-15.900006,12.760000,-1.899995);
			v(-15.899999,12.760000,1.900001);
			v(-15.899999,15.760001,2.900001);
			v(15.900007,15.760001,2.899993);
			v(-15.899994,0.040001,2.900006);
			v(15.900001,0.040001,2.900001);
			v(15.900003,0.040007,14.900001);
			v(-15.899991,0.040007,14.900006);
			v(15.900010,15.760008,14.899993);
			v(-15.899996,15.760008,14.900001);
			v(-15.899996,12.760009,15.900001);
			v(15.900010,12.760009,15.899993);
			v(-15.899991,0.040008,15.900006);
			v(15.900003,0.040008,15.900001);
			v(-15.900006,15.760000,-2.899995);
			v(15.899991,15.760000,-2.900010);
			v(-15.900002,0.040000,-2.899997);
			v(15.900001,0.040000,-2.900001);
			v(15.899997,0.039997,-14.900001);
			v(-15.900006,0.039997,-14.899997);
			v(15.899987,15.759996,-14.900010);
			v(-15.900010,15.759996,-14.899995);
			v(-15.900010,12.759996,-15.899995);
			v(15.899987,12.759996,-15.900010);
			v(-15.900006,0.039996,-15.899997);
			v(15.899997,0.039996,-15.900001);

			f(31,29,30,0.715267,0.000723,0.904797,0.000142,0.716729,0.477244,-0.000000,-1.000000,-0.000001);
			f(29,28,30,0.904797,0.000142,0.906258,0.476663,0.716729,0.477244,-0.000000,-1.000000,0.000000);
			f(25,24,30,0.476567,0.014985,0.000046,0.016447,0.476521,0.000000,0.000000,0.000000,-1.000000);
			f(24,31,30,0.000046,0.016447,0.000000,0.001462,0.476521,0.000000,0.000000,0.000000,-1.000000);
			f(26,27,28,0.951089,0.000000,0.952551,0.476521,0.906258,0.476663,-0.000000,-0.948683,0.316228);
			f(26,28,29,0.951089,0.000000,0.906258,0.476663,0.904797,0.000142,-0.000000,-0.948683,0.316228);
			f(24,26,29,0.479704,0.939365,0.715267,0.938643,0.670358,0.953766,1.000000,-0.000002,0.000001);
			f(24,29,31,0.479704,0.939365,0.670358,0.953766,0.479750,0.954350,1.000000,0.000000,0.000001);
			f(27,25,28,0.952246,0.492952,0.716683,0.492229,0.907337,0.477829,-1.000000,0.000001,-0.000000);
			f(25,30,28,0.716683,0.492229,0.716729,0.477244,0.907337,0.477829,-1.000000,0.000000,-0.000000);
			f(20,22,27,0.951694,0.672771,0.716131,0.672049,0.952246,0.492952,-1.000000,0.000000,-0.000000);
			f(22,25,27,0.716131,0.672049,0.716683,0.492229,0.952246,0.492952,-1.000000,0.000000,-0.000000);
			f(23,21,24,0.479152,0.759546,0.714715,0.758823,0.479704,0.939365,1.000000,-0.000000,0.000001);
			f(21,26,24,0.714715,0.758823,0.715267,0.938643,0.479704,0.939365,1.000000,-0.000000,0.000001);
			f(21,20,27,0.181281,0.478535,0.179819,0.955055,0.000000,0.954504,-0.000000,-0.000000,1.000000);
			f(21,27,26,0.181281,0.478535,0.000000,0.954504,0.001462,0.477983,-0.000000,-0.000000,1.000000);
			f(22,23,24,0.477119,0.194804,0.000598,0.196266,0.000046,0.016447,0.000000,0.000000,-1.000000);
			f(22,24,25,0.477119,0.194804,0.000046,0.016447,0.476567,0.014985,0.000000,0.000000,-1.000000);
			f(2,1,22,0.477165,0.209789,0.000644,0.211251,0.477119,0.194804,0.000000,0.000000,-1.000000);
			f(1,23,22,0.000644,0.211251,0.000598,0.196266,0.477119,0.194804,0.000000,0.000000,-1.000000);
			f(5,6,20,0.181281,0.954504,0.182743,0.477983,0.229035,0.478125,0.000000,0.948683,0.316228);
			f(5,20,21,0.181281,0.954504,0.229035,0.478125,0.227573,0.954646,0.000000,0.948683,0.316228);
			f(1,5,23,0.479106,0.744561,0.669714,0.743976,0.479152,0.759546,1.000000,-0.000000,0.000001);
			f(5,21,23,0.669714,0.743976,0.714715,0.758823,0.479152,0.759546,1.000000,0.000002,0.000001);
			f(6,2,22,0.906693,0.687618,0.716085,0.687033,0.716131,0.672049,-1.000000,0.000000,-0.000000);
			f(6,22,20,0.906693,0.687618,0.716131,0.672049,0.951694,0.672771,-1.000000,-0.000001,-0.000000);
			f(17,19,18,0.668974,0.476663,0.479445,0.477244,0.477983,0.000724,0.000000,1.000000,0.000001);
			f(17,18,16,0.668974,0.476663,0.477983,0.000724,0.667512,0.000142,0.000000,1.000000,0.000000);
			f(12,13,19,0.001416,0.462998,0.477937,0.461536,0.001462,0.477983,0.000000,0.000001,-1.000000);
			f(13,18,19,0.477937,0.461536,0.477983,0.476521,0.001462,0.477983,0.000000,0.000001,-1.000000);
			f(15,14,17,0.713805,0.000000,0.715267,0.476521,0.668974,0.476663,0.000000,0.948683,0.316228);
			f(15,17,16,0.713805,0.000000,0.668974,0.476663,0.667512,0.000142,0.000000,0.948683,0.316228);
			f(14,12,17,0.713897,0.492092,0.478334,0.492814,0.668896,0.477244,1.000000,-0.000001,-0.000000);
			f(12,19,17,0.478334,0.492814,0.478288,0.477829,0.668896,0.477244,1.000000,0.000000,-0.000001);
			f(13,15,16,0.715313,0.938780,0.950876,0.939503,0.905875,0.954350,-1.000000,-0.000001,-0.000000);
			f(13,16,18,0.715313,0.938780,0.905875,0.954350,0.715267,0.953765,-1.000000,0.000000,-0.000000);
			f(10,8,13,0.715864,0.758961,0.951427,0.759684,0.715313,0.938780,-1.000000,0.000000,-0.000000);
			f(8,15,13,0.951427,0.759684,0.950876,0.939503,0.715313,0.938780,-1.000000,0.000000,-0.000000);
			f(9,11,12,0.714449,0.671911,0.478885,0.672633,0.478334,0.492814,1.000000,-0.000000,-0.000000);
			f(9,12,14,0.714449,0.671911,0.478334,0.492814,0.713897,0.492092,1.000000,-0.000000,-0.000000);
			f(8,9,14,0.296702,0.954504,0.298163,0.477983,0.477983,0.478535,-0.000000,-0.000001,1.000000);
			f(8,14,15,0.296702,0.954504,0.477983,0.478535,0.476521,0.955056,-0.000000,-0.000001,1.000000);
			f(11,10,13,0.000864,0.283179,0.477385,0.281717,0.477937,0.461536,0.000000,0.000001,-1.000000);
			f(11,13,12,0.000864,0.283179,0.477937,0.461536,0.001416,0.462998,0.000000,0.000001,-1.000000);
			f(0,3,11,0.000818,0.268194,0.477339,0.266732,0.000864,0.283179,0.000000,0.000001,-1.000000);
			f(3,10,11,0.477339,0.266732,0.477385,0.281717,0.000864,0.283179,0.000000,0.000001,-1.000000);
			f(7,4,9,0.953708,0.953907,0.952246,0.477386,0.998538,0.477244,-0.000000,-0.948683,0.316228);
			f(7,9,8,0.953708,0.953907,0.998538,0.477244,1.000000,0.953765,-0.000000,-0.948683,0.316228);
			f(4,0,11,0.669540,0.687034,0.478931,0.687618,0.478885,0.672633,1.000000,0.000000,-0.000001);
			f(4,11,9,0.669540,0.687034,0.478885,0.672633,0.714449,0.671911,1.000000,0.000001,-0.000000);
			f(3,7,10,0.715910,0.743976,0.906519,0.744561,0.715864,0.758961,-1.000000,0.000000,-0.000000);
			f(7,8,10,0.906519,0.744561,0.951427,0.759684,0.715864,0.758961,-1.000000,0.000001,-0.000000);
			f(2,6,7,0.716085,0.687033,0.906693,0.687618,0.906519,0.744561,-1.000000,0.000002,-0.000000);
			f(2,7,3,0.716085,0.687033,0.906519,0.744561,0.715910,0.743976,-1.000000,0.000002,-0.000000);
			f(0,4,1,0.478931,0.687618,0.669540,0.687034,0.479106,0.744561,1.000000,0.000000,-0.000001);
			f(4,5,1,0.669540,0.687034,0.669714,0.743976,0.479106,0.744561,1.000000,-0.000004,0.000001);
			f(4,7,5,0.296702,0.478157,0.295240,0.954678,0.239759,0.477983,-0.000000,-0.000000,1.000000);
			f(7,6,5,0.295240,0.954678,0.238297,0.954504,0.239759,0.477983,0.000000,-0.000000,1.000000);
			f(0,1,3,0.000818,0.268194,0.000644,0.211251,0.477339,0.266732,0.000000,0.000000,-1.000000);
			f(1,2,3,0.000644,0.211251,0.477165,0.209789,0.477339,0.266732,0.000000,-0.000000,-1.000000);

			this.x = 0.000000;
			this.y = 0.000000;
			this.z = 0.000000;

			this.rotationX = 0.000000;
			this.rotationY = 0.000000;
			this.rotationZ = 0.000000;

			this.scaleX = 1.000000;
			this.scaleY = 1.000000;
			this.scaleZ = 1.000000;

			this.geometry.ready = true;
		}
		public function v(x:Number, y:Number, z:Number):void {
			ve.push(new Vertex3D(x, y, z));
		}

		public function f(vertexIndex1:Number, vertexIndex2:Number, vertexIndex3:Number, uv00:Number, uv01:Number, uv10:Number, uv11:Number, uv20:Number, uv21:Number, normalx:Number, normaly:Number, normalz:Number):void {
			var face : Triangle3D = new Triangle3D(this, [ve[vertexIndex1], ve[vertexIndex2], ve[vertexIndex3]], null, [ new NumberUV(uv00, uv01), new NumberUV(uv10, uv11), new NumberUV(uv20, uv21) ] );
			face.faceNormal = new Number3D(normalx,normaly,normalz);
			fa.push(face);
		}

		public function f2(vertexIndex1:Number, vertexIndex2:Number, vertexIndex3:Number):void {
			var face:Triangle3D = new Triangle3D(this, [ve[vertexIndex1], ve[vertexIndex2], ve[vertexIndex3]], null, []);
			fa.push(face);
		}

	}
}